package com.xuecheng.content.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xuecheng.content.model.dto.BindTeachplanMediaDto;
import com.xuecheng.content.model.dto.SaveTeachplanDto;
import com.xuecheng.content.model.dto.TeachplanDto;
import com.xuecheng.content.model.po.Teachplan;

import java.util.List;

/**
 * <p>
 * 课程计划 服务类
 * </p>
 *
 * @author itcast
 * @since 2023-02-11
 */
public interface TeachplanService extends IService<Teachplan> {

    /**
     * 根据课程id查询树型结构
     * @param courseId
     * @return
     */
    List<TeachplanDto> findTeachPlanTree(Long courseId);

    /**
     * 课程计划修改或者创建
     * @param saveTeachplanDto
     */
    void saveTeachplan(SaveTeachplanDto saveTeachplanDto);

    /**
     * 根据课程计划id删除课程计划
     * @param teachplanId
     */
    void deleteTeachplan(Long teachplanId);


    /**
     * 课程排序
     * @param moveType
     * @param teachplanId
     */
    void moveOrDown(String moveType, Long teachplanId);


    /**
     * 绑定媒资
     * @param bindTeachplanMediaDto
     */
    void associationMedia(BindTeachplanMediaDto bindTeachplanMediaDto);


    /**
     * 删除绑定的媒资信息
     * @param teachPlanId
     * @param mediaId
     */
    void deleteAssociationMedia(Long teachPlanId, String mediaId);
}
